package cn.source.zk.domain.entity;

import cn.source.common.annotation.Excel;
import cn.source.common.annotation.Excels;
import cn.source.common.core.domain.BaseEntity;
import cn.source.common.core.domain.entity.Customer;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Device extends BaseEntity {

    /**
     * 序号
     */
    private Long num;

    /**
     * 设备唯一标识
     */

    private String zhGuid;

    /**
     * 设备名称
     */
    @Excel(name = "设备名称")
    private String devName;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    private String devNum;

    /**
     * 设备状态
     */
    private String devStatus;

    /**
     * 设备描述
     */
    @Excel(name = "设备描述")
    private String devDesc;

    /**
     * 设备型号
     */
    @Excel(name = "设备型号")
    private Long devModelNum;

    /**
     * 设备厂商名称
     */
    //@Excel(name = "设备厂商名称")
    //private String devManufacturerName;

    /**
     * 设备出厂日期
     */
    //@JsonFormat(pattern = "yyyy-MM-dd")
    //@Excel(name = "设备出厂日期", dateFormat = "yyyy-MM-dd")
    //private Date devProductionDate;

    /**
     * 维修日期
     */
    //@JsonFormat(pattern = "yyyy-MM-dd")
    //@Excel(name = "维修日期", dateFormat = "yyyy-MM-dd")
    //private Date maintainDate;

    /**
     * 下次维修日期
     */
    //@JsonFormat(pattern = "yyyy-MM-dd")
    //@Excel(name = "下次维修日期", dateFormat = "yyyy-MM-dd")
    //private Date nextMaintainDate;

    /**
     * 通道数量
     */
    private Integer channelSum;

    /**
     * 所属变电站
     */
    private Long substationNum;

    /**
     * sim卡
     */
    private Long simCardNum;

    /**
     * 所属客户
     */
    private Long customerNum;

    @Excels(
            @Excel(name = "所属变电站", targetAttr = "substationName", type = Excel.Type.EXPORT)
    )
    private Substation substation;


    private Customer customer;

    @Excels(
            @Excel(name = "设备类型", targetAttr = "name", type = Excel.Type.EXPORT)
    )
    private DevModel devModel;

    @Excels(
            @Excel(name = "sim卡", targetAttr = "phone", type = Excel.Type.EXPORT)
    )
    private SimCard simCard;

    @Excels(
            @Excel(name = "设备状态", targetAttr = "name", type = Excel.Type.EXPORT)
    )
    private DeviceStatus deviceStatus;

    private Long areaNum; //作为参数用；

    private List<Long> areaChildNums; // 作为参数用；

    /**
     * 数据源
     */
    @Excel(name = "数据源")
    private String devInfoSource;

    /**
     * 入网方式
     */
    @Excel(name = "入网方式")
    private String connMode;

    /**
     * MAC地址
     */
    @Excel(name = "MAC地址")
    private String devMac;

    /**
     * 安装位置
     */
    @Excel(name = "安装位置")
    private String installationSite;

    /**
     * 投运日期
     */
    @Excel(name = "投运日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date putDate;

    /**
     * 存储间隔（分钟）
     */
    @Excel(name = "存储间隔（分钟）",dateFormat = "yyyy-MM-dd")
    private String storageInterval;

    private String communicationProtocolNum;

    private CommunicationProtocol communicationProtocol;

    /**
     * 通讯状态
     */
    private String communicationStatusNum;

    private String terminalIdentifier;

    /**
     * 排序
     */
    private Long sort;

}
